// pages/blessing/my_blessing/index.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    imgurl: app.urlimg,
    listes:'',
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that=this;
    app.app_load(load_fn);

    function load_fn() {
      wx.showLoading({
        title: '加载中...',
      });
    wx.request({
      url: app.url + 'api_blessing/my_blessing_gift_log',
      data: {},
      header: {
        'content-type': 'application/json',
        'token': wx.getStorageSync('token_key')
      }, success: function (res) {
        wx.hideLoading();
        console.log(res)
        that.setData({
          listes: res.data.result,
        })
      }
    })
    }
  },
  listes_click:function(e){
    wx.redirectTo({
      url: '/pages/blessing/detail/index?id=' + e.currentTarget.dataset.id,
    })
  },

})